<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>单身交友平台平台</title>
	<link href="${ctxPath}/static/web/css/public.css" rel="stylesheet" type="text/css"/>
	<link href="${ctxPath}/static/web/css/css.css" rel="stylesheet" type="text/css"/>
	<link href="${ctxPath}/static/web/css/hbcss.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript" src="${ctxPath}/static/web/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/web/js/public.js"></script>
</head>

<body>
<!--top 开始-->
@layout("/web/include/top.html"){}
<!--top 结束-->
<div class="content">
	<!--和包导航 开始-->
	<!--#include virtual="/include/hb_top.html"-->
	@layout("/web/include/hb_top.html"){}
	<!--和包导航 结束-->

	<div class="hb_mbx">
		<a href="${ctxPath}/front/index">主页</a> >登录
	</div>
	<div class="clear"></div>

	<div class="hb_cont">
		<!--左侧 开始-->
		@layout("/web/include/hb_left.html"){}
		<!--#include virtual="/include/hb_left.html"-->
		<!--左侧 结束-->
		<!--右侧 开始-->
		<form action="${ctxPath}/front/tlogin" id="reg-form">
			<div class="hb_cont_r">
				<div class="hb_r_top">
					<p class="hb_r_top_tit">登录</p>
					<lable class="mt30">
						<span>用户名：</span>
						<input name="username" id="username" type="text" placeholder="请输入账号" data-error="注册失败"/>
					</lable>

					<lable>
						<span>密码：</span>
						<input name="password" id="password" type="password" placeholder="请输入密码" />
					</lable>


					<a href="#" class="link ml150 mb20"  type="submit" name="reg-btn" id="reg-btn" value="注册">
						<span class="word_left"></span>
						<span class="word_cen">保存</span>
						<span class="word_right"></span>
					</a>
					<a href="#" class="link ml10">
						<span class="word_left"></span>
						<span class="word_cen">重置</span>
						<span class="word_right"></span>
					</a>
					<div class="clear"></div>
				</div>

				<div class="hb_r_table"></div>
			</div>
		</form>
		<!--右侧 结束-->
	</div>

	<!--pay_helpcent 开始-->
	@layout("/web/include/helpcent2.html"){}
	<!--pay_helpcent 开始-->

	<!--foot 开始-->
	@layout("/web/include/foot.html"){}
	<!--foot 结束-->
	<script type="text/javascript" src="${ctxPath!}/static/js/jquery.min.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/js/plugins/layer/layer.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/validate/Validform_v5.3.2_min.js"></script>

	<script>

        jQuery(function ($) {
            $("#reg-form").Validform({
                btnSubmit: "#reg-btn",
                ajaxPost: true,
                beforeSubmit: function (curform) {
                    $("#reg-btn").attr("disabled", "disabled").find("span").text("登 录中…");
                },
                callback: function (data) {
                    console.log(data);
                    if (undefined != data.error) {
                        $("#reg-btn").removeAttr("disabled").find("span").text("登 录");
                        var obj = $("#reg-form input[data-error='" + data.error + "']");
                        layer.tips(data.error, obj, {
                            guide: 0,
                            time: 4,
                            style: ['background-color:#F26C4F; color:#fff', '#F26C4F'],
                        });
                    } else {
                        window.location.href = "${ctxPath!}/front/index";
                    }
                },
                tiptype: function (msg, o, cssctl) {
                    if (!o.obj.is("form")) {
                        if (o.type != 2) {
                            layer.tips(msg, o.obj, {
                                guide: 3,
                                time: 4,
                                style: ['background-color:#F26C4F; color:#fff', '#F26C4F'],
                            });
                        }
                    }
                },
                tipSweep: true
            });

            $("#reg-form").keydown(function (e) {
                var e = e || event,
                    keycode = e.which || e.keyCode;
                if (keycode == 13) {
                    $("#reg-btn").trigger("click");
                }
            });

        });
	</script>
</div>
</body>
</html>
